package net.itgoo.parkingpay.rest.model;

import org.json.JSONObject;

public class ParkingRecordModel {
    public long id;
    public String inPlace;
    public String plate;
    public String inTime;
    public String company;

    public static ParkingRecordModel parse(JSONObject jsonObject) {
        ParkingRecordModel orderModel = new ParkingRecordModel();
        if (jsonObject != null) {
            try {
                orderModel.id = jsonObject.getLong("id");
                orderModel.inPlace = jsonObject.getString("inplace");
                orderModel.inTime = jsonObject.getString("intime");
                orderModel.plate = jsonObject.getString("plateno");
                orderModel.company = jsonObject.getString("company");
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
        return orderModel;
    }
}
